<template>
  <div class="Personage">
    <div class="content clearfix">
      <div class="sidebar">
        <!-- 头像 -->
        <div class="head">
          <div class="headImg" @click="alter = true">
            <img src="../../../assets/img/login/touxiang.png" alt="">
            <span v-if="alter">修改头像</span>
          </div>
          <div class="headName">小机灵</div>
          <el-button @click="alter = false">修改昵称</el-button>
        </div>
        <!-- 导航栏 -->
        <div class="userTab">
          <router-link to="/vMain/newpersonage">用户资料</router-link>
          <router-link to="/vMain/newpersonage/msg">消息中心</router-link>
          <router-link to="/vMain/newpersonage/set">设置中心</router-link>
        </div>
      </div>
      <div class="contentbody">
        <router-view />
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'Personage',
  data() {
    return {
      alter: false
    }
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.Personage {
  width: 100%;
  max-width: 1920px;
  min-width: 1200px;
  background-color: rgba(246, 246, 246, 1);
  height: 100%;
  > .content {
    width: 1200px;
    margin: 0 auto;
    > .el-breadcrumb {
      margin: 24px 0;
    }
    > .sidebar {
      float: left;
      > .head {
        width: 260px;
        height: 190px;
        background: rgba(255, 255, 255, 1);
        padding: 20px 90px;
        > .headImg {
          width: 96px;
          height: 96px;
          border-radius: 50%;
          img{
            width: 100%;
            height: 100%;
          }
          span{
            width: 100%;
            height: 100%;
            display: block;
            background:rgba(0,0,0,1);
            border-radius:50%;
            opacity:0.6;
            line-height: 96px;
            text-align: center;
            color:rgba(209,209,209,1);
            font-size: 16px;
            position: relative;
            top: -97px;
          }
        }
        > .headName {
          font-size: 16px;
          margin: 5px;
          text-align: center;
        }
        > .el-button {
          width:96px;
          height:30px;
          line-height: 8px;
          border:1px solid rgba(65,122,239,1);
          border-radius:16px;
          background-color: #ffffff;
          color: #417AEF;
        }
        .el-button:hover {
          background-color: #417AEF;
          color: #ffffff;
        }
      }
      > .userTab {
        font-size: 16px;
        width: 260px;
        background: rgba(255, 255, 255, 1);
        margin-top: 5px;
        display: flex;
        flex-flow: row wrap;
        >a{
          display: block;
          width: 100%;
          text-align: center;
          height: 50px;
          line-height: 50px;
          color: #333;
        }
        >a:hover{
          background-color: #D9E4FC;
          border-left: 2px solid #417AEF;
        }
        .router-link-exact-active{
          background-color: #D9E4FC;
          border-left: 2px solid #417AEF;
        }
      }
    }
    > .contentbody {
      width: 920px;
      margin-bottom: 60px;
      background: rgba(255, 255, 255, 1);
      float: right;
      // padding: 23px 30px 0px 30px;
    }
  }
  .is-active{
    border-left: 2px solid #417AEF !important;
  }
  .el-menu-item:focus, .el-menu-item:hover{
    border-left: 2px solid #417AEF !important;
  }
}
</style>
